<?php
include 'config.php';
include 'opendb.php';

$backupFile = $dbname . '.sql';
$command = "c:\\xampp\\mysql\\bin\\mysqldump --opt --host $dbhost --user $dbuser --password=$dbpass $dbname > $backupFile";
exec($command);
echo $command;
include 'closedb.php';
?> 